package com.lanou.remember.mapper;

import com.lanou.k12.entity.Question;
import com.lanou.k12.entity.ResultObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Repository
public interface QuestionMapper {

    public int findQuestionNum();

    public List<Question> findFirstQuestion();

    public int addQuestion(@Param("q") Question question);

    public List<Question> findQuestionByKeyWord(@Param("i") Integer id, @Param("q") String question, @Param("a") String answer);

    public List<Question> findQuestion(@Param("uid") int uid);

    public int updateQuestion(@Param("q") Question question);

    public List<Question> findQuestionByStatus();

    public int deleteQuestion(@Param("qid") int qid, @Param("status") int status);

    public int findQuestionStatus(@Param("qid")int qid);
}
